<template>
    <div class="home">
       <div class="a"></div>
       <div class="b"></div>
       <div class="c"></div>
       <div class="d"></div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            num:0
        }
    },
    activated() {
        let home = document.querySelector('.home')
        home.addEventListener('scroll',(e)=>{
           
            this.num = e.target.scrollTop
        })
        home.scrollTop = this.num
    },
}
</script>

<style>
.a{
    width: 100%;
    height: 800px;
    background: orange;
}
.b{
    width: 100%;
    height: 800px;
    background: purple;
}
.c{
    width: 100%;
    height: 800px;
    background: yellow;
}
.d{
    width: 100%;
    height: 800px;
    background: red;
}
</style>